/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.customer.facade.info;

import com.alibaba.fastjson2.annotation.JSONField;
import info.peigen.hotpot.business.account.facade.info.AccountInfo;
import info.peigen.hotpot.business.customer.facade.enums.CustomerSource;
import info.peigen.hotpot.business.customer.facade.enums.CustomerStatus;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

import java.util.Date;
import java.util.List;

/**
 * <b>(CustomerInfo)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/8/10
 */
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class CustomerInfo {
    /** 客户Id,有别于表id */
    String                     customerId;
    /** 客户基础信息 */
    CustomerBaseInfo           baseInfo;
    /** 实名认证 */
    CustomerAuthenticationInfo authenticatorInfo;
    /** 主操作员 */
    CustomerOperatorInfo       masterOperatorInfo;
    /** 所有操作员-企业客户需要多个操作员，包括主操作员 */
    List<CustomerOperatorInfo> operatorInfos;
    /** 客户权限 */
    String                     permission;
    /** 账户列表 */
    List<AccountInfo>          accounts;
    /** 客户营销相关信息 */
    CustomerMarketingInfo      marketingInfo;
    /** 客户技术相关信息 */
    CustomerTechBaseInfo       customerTechBaseInfo;
    /** 客户状态 */
    CustomerStatus             status;
    /** 客户等级 */
    CustomerLevelInfo          level;
    /** 是否有交易密码 */
    @Builder.Default
    Boolean hasPayPassword = Boolean.FALSE;
    /** 注册时间 */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    Date    createTime;
    /** 收费规则 */
    CustomerFeeRuleInfo customerFeeRuleInfo;
    /** 客户来源 */
    @Builder.Default
    CustomerSource source = CustomerSource.Weixin;

    String token;
}